<template>
    <div class="demo">
        <button @click="sendStu">点我传递信息</button>
        <!-- <button @click="haha">哈哈</button> -->
    </div>
</template>
<script>
    export default {
        name: 'SchoolN',
        props: ['GetStudent'],
        data() {
            return {
                name: '传统传送'
            }
        },
        methods: {
            sendStu() {
                this.GetStudent(this.name)
            }//, haha() {
            //     this.hahaha()
            // }
        }, mounted() {
            this.$on('hahaha', () => {
                console.log('你好');
            })
        },
    }
</script>

<style scoped>
    .demo {
        background-color: orange;
    }
</style>